package com.inspur.zhangpeixia.goods.service.impl;

import com.inspur.zhangpeixia.goods.dao.CategoryDao;
import com.inspur.zhangpeixia.goods.entity.Category;
import com.inspur.zhangpeixia.goods.service.CategoryService;

import java.util.List;

public class CategoryServiceImpl implements CategoryService {
    private CategoryDao categoryDao = new CategoryDao();


    @Override
    public List<Category> listCategory(String keyword) {
        return categoryDao.listCategory(keyword);
    }

    @Override
    public int addCategory(Category category) {
       return categoryDao.addCategory(category);
    }

    @Override
    public int updateCategory(Category category) {
        return categoryDao.updateCategory(category);
    }

    @Override
    public int deleteCategory(int id) {
        return categoryDao.deleteCategory(id);
    }

}
